#ifndef _H_GAMEENGINE
#define _H_GAMEENGINE

#include <queue>
#include <pthread\cppthread.h>

#include "map.h"

using namespace std;

class gameEngine{

    protected:
        mapCtr inMap;

        queue<actor*> waitingNActors;
        //pthread_cond_t waitForNActors;
        //pthread_mutex_t NWaitLock;
        //pthread_mutex_t NactWLock;

    public:

        cppthread_cond_t NActorsCond;
        cppthread_mutex_t NActorsMutex;

        gameEngine();
        ~gameEngine();

        mapCtr* getMap();

        void stackNActorW(actor*);
        actor* getNextNActorW();
        /*void waitNActors();
        void lockNAW();
        void unlockNAW();*/

        void execActions();

};

extern gameEngine * GE;

#endif
